import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import about from '@/components/about'
import guide from '@/components/guide'
import guideA from '@/components/guideA'
import guideB from '@/components/guideB'
import aboutA from '@/components/aboutA'
import aboutB from '@/components/aboutB'
import counsel from '@/components/counsel'
import counselA from '@/components/counselA'
import counselB from '@/components/counselB'
import news from '@/components/news'
import newsA from '@/components/newsA'
import newsB from '@/components/newsB'
import newsADetail1 from '@/components/newsA_detail_1'
import newsADetail2 from '@/components/newsA_detail_2'
import newsADetail3 from '@/components/newsA_detail_3'
import newsADetail4 from '@/components/newsA_detail_4'
import newsADetail5 from '@/components/newsA_detail_5'
import newsADetail6 from '@/components/newsA_detail_6'
import newsADetail7 from '@/components/newsA_detail_7'
import newsBDetail1 from '@/components/newsB_detail_1'
import newsBDetail2 from '@/components/newsB_detail_2'
import newsBDetail3 from '@/components/newsB_detail_3'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'link-active',
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  },
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/about',
      name: 'about',
      component: about,
      children: [
        {
          path: '',
          component: aboutA
        },
        {
          path: 'b',
          component: aboutB
        }
      ]
    },
    {
      path: '/guide',
      name: 'guide',
      component: guide,
      children: [
        {
          path: '',
          component: guideA
        },
        {
          path: 'b',
          component: guideB
        }
      ]
    },
    {
      path: '/counsel',
      name: 'counsel',
      component: counsel,
      children: [
        {
          path: '',
          component: counselA
        },
        {
          path: 'b',
          component: counselB
        }
      ]
    },
    {
      path: '/news',
      name: 'news',
      component: news
    },
    {
      path: '/news/a',
      component: newsA
    },
    {
      path: '/news/b',
      component: newsB
    },
    {
      path: '/news/a/newsADetail1',
      name: 'newsADetail1',
      component: newsADetail1
    },
    {
      path: '/news/a/newsADetail2',
      name: 'newsADetail2',
      component: newsADetail2
    },
    {
      path: '/news/a/newsADetail3',
      name: 'newsADetail3',
      component: newsADetail3
    },
    {
      path: '/news/a/newsADetail4',
      name: 'newsADetail4',
      component: newsADetail4
    },
    {
      path: '/news/a/newsADetail5',
      name: 'newsADetail5',
      component: newsADetail5
    },
    {
      path: '/news/a/newsADetail6',
      name: 'newsADetail6',
      component: newsADetail6
    },
    {
      path: '/news/a/newsADetail7',
      name: 'newsADetail7',
      component: newsADetail7
    },
    {
      path: '/news/b/newsBDetail1',
      name: 'newsBdetail1',
      component: newsBDetail1
    },
    {
      path: '/news/b/newsBDetail2',
      name: 'newsBdetail2',
      component: newsBDetail2
    },
    {
      path: '/news/b/newsBDetail3',
      name: 'newsBdetail3',
      component: newsBDetail3
    }
  ]
})
